package com.example.rabbitmq.controller.confirm;

import com.example.rabbitmq.Constants;
import jakarta.annotation.Resource;
import org.springframework.amqp.rabbit.connection.CorrelationData;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

//@RestController
//@RequestMapping("/producer")
//public class ConfirmProducerController {
//
//    @Resource(name = "confirmRabbitTemplate")
//    private RabbitTemplate rabbitTemplate;
//    @RequestMapping("/confirm")
//    public String confirm() {
//        CorrelationData correlationData = new CorrelationData("1");
//        rabbitTemplate.convertAndSend(Constants.CONFIRM_EXCHANGE,"confirm",
//                "confirm test...",correlationData);
//        return "消息发送成功";
//    }
//}
